#ifndef _AE_DEFS_H_
#define _AE_DEFS_H_
#include <stdint.h>


#define AE_VERSION			1000
#define AE_VERSION_STR		"1.0.0"

#define AE_SERVO_MAX		32
#define AE_PATH_MAX			32

#pragma pack(1)

typedef enum _AeRet
{
	AE_RET_SUCCESS = 0,
	AE_RET_GET_ACTIONS_TASK,
	AE_RET_SET_ANGLE_TASK,
	AE_RET_SET_ANGLES_TASK,

	AE_RET_ERROR,
	AE_RET_PARAMS,
	AE_RET_TIMEOUT,
	AE_RET_UNSUPPORT,
	AE_RET_LIMITED,
	AE_RET_NOT_EXISTS,
	AE_RET_NOSPACE,
	AE_RET_BUSY
} AeRet_t;

typedef enum _AeState
{
	AE_STS_IDEL = 0,
	AE_STS_PLAYING,
	AE_STS_PAUSED,
	AE_STS_TEACHING
} AeState_t;

///////////////////////////////////////////////////
// Action
typedef struct _AeActHeader
{
	uint8_t servoCnt;
	uint32_t lenMsec;
	uint32_t seqCnt;
	uint8_t mp3;
	uint8_t mp3Dir;
	uint8_t mp3Idx;
} AeActHeader_t;

typedef struct _AeActPose
{
	uint32_t seq; // Start from 0
	uint32_t servoMsec;
	uint32_t waitMsec; // Total time of this pose, >= servoMsec
	uint8_t led;
	uint16_t angles[AE_SERVO_MAX];
} AeActPose_t;

#pragma pack()

#endif

